package com.guns.repository;

import com.guns.domain.CarInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

public interface InfoRepository extends JpaRepository<CarInfo,Integer> {
    @Transactional
    @Modifying(clearAutomatically = true)
    @Query(value = "update sys_car_info p set p.status =?1 where p.plate_number = ?2",nativeQuery = true)
    void updateByNum(int status,String number);
}
